#ifndef MYUTIL_H
#define MYUTIL_H

#include <stdio.h>
#include "absyn.h"

typedef enum {
	GET_SIMPLE,
	GET_FIELD,
	GET_ARRAY
} VarMode;

typedef struct myVar* myVarList;
struct myVar{
	struct myVar* next;
	VarMode mode;
	A_pos pos;
	union{
		string id;
		A_exp idx;
	} field;	
};

A_var transVar(myVarList list);
myVarList getVarList(struct myVar var);

#endif
